/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.squela

import java.lang.reflect.Method
import scala.collection.mutable.ArrayBuffer

private[squela] object Utils {

  def getMethodsForClass(clazz: Class[_]): Seq[Method] = {
    val res = new ArrayBuffer[Method]();
    var it = clazz.getSuperclass();
    while (it != null) {
      res ++= it.getMethods()
      it = it.getSuperclass();
    }
    res.reverse ++= clazz.getDeclaredMethods
  }
}
